package com.hxtec.polaris.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;import java.util.List;
import javax.persistence.*;
import lombok.Data;

/**
 * @author Caps
 * @date 2019/12/6
 */
@ApiModel(value = "com.hxtec.polaris.entity.ShopProductVariant")
@Data
@Table(name = "shop_product_variant")
public class ShopProductVariant implements Serializable {
    @Transient
    List<ShopProductVariantAttrValue> skuSaleAttrValueList;
    @Transient
    List<ShopProductVariantImage> skuImageList;
    /**
     * 商品sku
     */
    @Id
    @Column(name = "sku")
    @GeneratedValue(generator = "JDBC")
    @ApiModelProperty(value = "商品sku")
    private Integer sku;

    /**
     * 商品spu
     */
    @Column(name = "spu")
    @ApiModelProperty(value = "商品spu")
    private Integer spu;

    /**
     * 产品名称
     */
    @Column(name = "sku_name")
    @ApiModelProperty(value = "产品名称")
    private String skuName;

    /**
     * 商品分类id
     */
    @Column(name = "category_id")
    @ApiModelProperty(value = "商品分类id")
    private Integer categoryId;

    /**
     * 商品原价
     */
    @Column(name = "price")
    @ApiModelProperty(value = "商品原价")
    private BigDecimal price;

    /**
     * 商品折扣价
     */
    @Column(name = "discount_price")
    @ApiModelProperty(value = "商品折扣价")
    private BigDecimal discountPrice;

    /**
     * 折扣
     */
    @Column(name = "discount")
    @ApiModelProperty(value = "折扣")
    private String discount;

    /**
     * 图片
     */
    @Column(name = "image")
    @ApiModelProperty(value = "图片")
    private String image;

    /**
     * 上下架状态
     */
    @Column(name = "`state`")
    @ApiModelProperty(value = "上下架状态")
    private String state;

    /**
     * 产品描述
     */
    @Column(name = "description")
    @ApiModelProperty(value = "产品描述")
    private String description;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 修改时间
     */
    @Column(name = "update_time")
    @ApiModelProperty(value = "修改时间")
    private Date updateTime;

    /**
     * 权重
     */
    @Column(name = "weight")
    @ApiModelProperty(value = "权重")
    private Double weight;

    /**
     * 备用字段1
     */
    @Column(name = "comment1")
    @ApiModelProperty(value = "备用字段1")
    private String comment1;

    /**
     * 备用字段2
     */
    @Column(name = "comment2")
    @ApiModelProperty(value = "备用字段2")
    private String comment2;

    /**
     * 备用字段3
     */
    @Column(name = "comment3")
    @ApiModelProperty(value = "备用字段3")
    private String comment3;

    private static final long serialVersionUID = 1L;
}